﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace ChuyenDongVatLy
{
   
    public class BaseObject
    {
       private float _a;
       private float _v;
       private float _v0;
       private float _m;
       private Vector2 _posCenter;

       public Vector2 PosCenter
       {
           get { return _posCenter; }
           set { _posCenter = value; }
       }
       private Vector2 _position;
       private Texture2D _picture;
       private int _size;

       public int Size
       {
           get { return _size; }
           set { _size = value; }
       }
        
       private double _angularFrequency;      
       private double _angularBegin;
       private double _angularThrow;

       private int _collisionWith;//0 la khog cham gi,1 la cham voi 1 mpn
      //------------------------------------------------    
      //------------------------------------------------
       public BaseObject() {
           _a=_v=_v0 = 0;
           _m = 1;
           _angularBegin = _angularFrequency = _angularThrow = 0;
           _position = Vector2.Zero;
           _size = ConstPhysic.SizeObject;
           _posCenter = new Vector2((_position.X+_size)/2,(_position.Y+_size)/2);

       }
       
       public float A
       {
           set { _a = value; }
           get { return _a; }
        }
       public int CollisionWith
       {
           set { _collisionWith = value; }
           get { return _collisionWith; }
       }
       public float M
       {
           set { _m = value; }
           get { return _m; }
       }
       public double AngularThrow
        {
           get { return _angularThrow; }
           set { _angularThrow = value; }
        }
        public float V
        {
            set { _v = value; }
            get { return _v; }
        }
        public Vector2 Pos
        {
            set { _position = value; }
            get { return _position; }
        }
        public Texture2D Picture
        {
            set { _picture = value; }
            get{ return _picture;}
        }   
        public double AnBegin
        {
            get { return _angularBegin; }
            set { _angularBegin = value; }
        }
        public double AngFre
        {
            get { return _angularFrequency; }
            set { _angularFrequency = value; }
        }
        public float V0
        {
            get { return _v0; }
            set { _v0 = value; }
        }        
    }
}
